$(document).ready(function(){
    $.ajax({
        type: 'post',
        url: 'http://117.78.51.36/taxer/Emp/findAll',
        data: '',
        dataType: 'json',
        contentType: "application/json; charset=utf-8",
        success: function(result) {
            var html='';
            for(var i in result.data){
                var sex=result.data[i].sex?"男":"女";

                html+="<tr><td style='display:none;'>"
                    + result.data[i].id +"</td><td>"
                    + result.data[i].name +"</td><td>"
                    + sex+"</td><td>"
                    + result.data[i].age +"</td><td>"
                    + result.data[i].identify +"</td><td>"
                    + result.data[i].phone +"</td><td>"
                    + result.data[i].email +"</td><td>"
                    + result.data[i].address +"</td><td>"
                    +"<a href=\"javascript:void(0)\" onclick='editInfo(this)'><i class=\"icon-edit icon\"></i></a>"
                    + "<a href=\"javascript:void(0)\" onclick='delEmp(this)'><i class=\"icon-delete icon\"></i></a>" +
                    "</td></tr>"
            }
            $("#res tbody").html(html);
        }
    });



})

